using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CMS.BLL;

public partial class Login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.InitData(); 
        }
    }

    private void InitData()
    {
        int nCurrentLanguage = Support.GetCurrentLanguage();

        Company objCompany = new Company();
        DataTable dtbCompany = new DataTable();
        dtbCompany = objCompany.Search();

        switch (nCurrentLanguage)
        { 
            case 1:
                Page.Title = ConvertData.ConvertToString(dtbCompany.Rows[0]["CompanyName1"]);
                lblCompanyName.Text = ConvertData.ConvertToString(dtbCompany.Rows[0]["CompanyName1"]);
                break;
            case 2:
                Page.Title = ConvertData.ConvertToString(dtbCompany.Rows[0]["CompanyName2"]);
                lblCompanyName.Text = ConvertData.ConvertToString(dtbCompany.Rows[0]["CompanyName2"]);
                break;
            case 3:
                Page.Title = ConvertData.ConvertToString(dtbCompany.Rows[0]["CompanyName3"]);
                lblCompanyName.Text = ConvertData.ConvertToString(dtbCompany.Rows[0]["CompanyName3"]);
                break;

        }
    }
}
